package com.hafu.service;

import com.hafu.dao.KhInfoDao;
import com.hafu.model.KhInfo;

import java.util.ArrayList;

public class KhInfoService {
    private static KhInfoDao khInfoDao = new KhInfoDao();
    public Boolean addKhInfo(KhInfo kh)
    {
        Boolean aBoolean = khInfoDao.addKhinfo(kh);
        return aBoolean;
    }
    public static Boolean deleteKhInfo(int id)
    {
        Boolean aBoolean = khInfoDao.deleteKhinfo(id);
        return aBoolean;
    }
    public ArrayList<KhInfo> getKhInfoByName(KhInfo kh)
    {
        ArrayList<KhInfo> khInfos = khInfoDao.getKhInfoById(kh);
        return khInfos;
    }
    public static Boolean updateKhInfo(KhInfo kh)
    {
        Boolean aBoolean = khInfoDao.updateKhInfo(kh);
        return aBoolean;
    }
}
